package com.ethanJun.config;

import com.ethanJun.service.McpDemoServerService;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.ai.tool.method.MethodToolCallbackProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 衣立君
 * @date 2025/04/10 16:13
 **/
@Configuration
public class ServerConfigDemoTools{

    @Bean
    public ToolCallbackProvider bookServiceTools(McpDemoServerService mcpServerService) {
        // …… 注册工具
        return MethodToolCallbackProvider.builder().toolObjects(mcpServerService).build();
    }
}